package com.cskaoyan.mall.model.vo;

import com.cskaoyan.mall.model.enumaration.OrderState;

import java.util.ArrayList;
import java.util.List;

public class OrderVO {
    private Integer id;
    private Double amount;
    private Integer num;
    private Integer goodsDetailId;
    private Integer state;
    private String goods;
    private List<Spec> spec = new ArrayList<>();
    private List<StatesVO> states = new ArrayList<>();
    private CurSpecVO curSpec = new CurSpecVO();
    private CurStateVO curState = new CurStateVO();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public List<Spec> getSpec() {
        return spec;
    }

    public void setSpec(List<Spec> spec) {
        this.spec = spec;
    }

    public List<StatesVO> getStates() {
        return states;
    }

    public void setStates() {
        states.add(new StatesVO(OrderState.UN_PAID.getCode(),OrderState.UN_PAID.getValue()));
        states.add(new StatesVO(OrderState.UN_SHIPED.getCode(),OrderState.UN_SHIPED.getValue()));
        states.add(new StatesVO(OrderState.DELIVERED.getCode(),OrderState.DELIVERED.getValue()));
        states.add(new StatesVO(OrderState.RECEIVED.getCode(),OrderState.RECEIVED.getValue()));
    }

    public CurSpecVO getCurSpec() {
        return curSpec;
    }

    public void setCurSpec(CurSpecVO curSpec) {
        this.curSpec = curSpec;
    }

    public CurStateVO getCurState() {
        return curState;
    }

    public void setCurState(CurStateVO curState) {
        this.curState = curState;
    }
}
